<?php
/* @var $this yii\web\View */

use yii\helpers\Html;
use common\assets\WeuiPluginAsset;

$this->title = '分销佣金';

WeuiPluginAsset::register($this);
$this->registerJs($this->render('_script.js'));
?>
<div class="weui-media-box weui-media-box_small-appmsg">
    <div class="weui-cells weui-cells-reverse">
        <div class="weui-cell bg-blue">
            <div class="weui-cell__bd weui-cell_primary">
                <p>累计佣金(元)</p>
                <p class="font-number"><?= Yii::$app->formatter->asDecimal($account->amount / 100, 2) ?></p>
            </div>
            <div class="weui-cell__ft">
                <a class="weui-btn weui-btn_mini weui-btn-block" href="javascript:;">佣金提现</a>
            </div>
        </div>
    </div>
</div>
<div class="weui-cells weui-cells-text-small">
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/cash_color.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>可提现佣金</p>
        </div>
        <div class="weui-cell__ft"><?= Yii::$app->formatter->asDecimal($account->current / 100, 2) ?> 元</div>
    </div>
</div>
<div class="weui-cells weui-cells-text-small">
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/balance_wait.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>已申请佣金</p>
        </div>
        <div class="weui-cell__ft">0.00 元</div>
    </div>
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/coffe.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>待打款佣金</p>
        </div>
        <div class="weui-cell__ft">0.00 元</div>
    </div>
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/invalid.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>无效佣金</p>
        </div>
        <div class="weui-cell__ft">0.00 元</div>
    </div>
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/wallet.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>成功提现佣金</p>
        </div>
        <div class="weui-cell__ft"><?= Yii::$app->formatter->asDecimal($account->withdraw / 100, 2) ?> 元</div>
    </div>
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/truck.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>待收货佣金</p>
        </div>
        <div class="weui-cell__ft">0.00 元</div>
    </div>
    <div class="weui-cell weui-cell-small">
        <div class="weui-cell__hd">
            <?= Html::img($directoryAsset . '/images/icons/gray/waiting.png', ['class' => 'weui-cell-media']) ?>
        </div>
        <div class="weui-cell__bd">
            <p>未结算佣金</p>
        </div>
        <div class="weui-cell__ft">0.00 元</div>
    </div>
</div>
<div class="weui-panel">
    <div class="weui-panel__hd">用户须知</div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_text">
            <p class="weui-media-box__desc">买家确认收货后，系统将自动处理分销佣金到您的账户</p>
        </div>
    </div>
</div>

<div class="content-padded">
    <button class="weui-btn weui-btn_warn" id="btnCash" data-current="<?= $account->current ?>">我要提现</button>
</div>